<?php
/**
 * Created by xiaosong
 * E-mail:4155433@gmail.com
 * Date: 2019/10/9
 * Time: 11:48
 */

namespace App\Models\goods\observe;




use App\Models\goods\GoodsDetail;

class GoodsDetailObserve
{
    public function creating(GoodsDetail $goodsDetail)
    {

        if (empty($goodsDetail->brief)){
            $goodsDetail->brief =  '';
        }

        if (empty($goodsDetail->spec_name)){
            $goodsDetail->spec_name =  '';
        }

        if (empty($goodsDetail->parameter)){
            $goodsDetail->parameter =  '';
        }


    }


    public function created(GoodsDetail $goodsDetail)
    {




    }


    public function updated(GoodsDetail $goodsDetail)
    {



    }

    public function deleted(GoodsDetail $goodsDetail)
    {



    }

    public function updating(GoodsDetail $goodsDetail)
    {


    }



}